﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace mes_tublay
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            System.Threading.Mutex mtx = new System.Threading.Mutex(false, "mes-tublay");
            try
            {
                if (mtx.WaitOne(0, false))
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new frmMain());
                }
                else
                {
                    MESCodeFile.Confirm.Error("mes-tublay", "An instance of this application is already running.");

                }
            }
            finally
            {
                if (mtx != null)
                {
                    mtx.Close();
                    mtx = null;
                }
            }
        }
    }
}
